#pragma once

#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>

#include "GLDraw.h"

// 顶点结构
struct GLVertex {
	glm::vec3 position;		// position
	glm::vec3 normal;		// normal
	glm::vec2 texCoords;    // texCoords
};

// 网格数据结构
class GLMesh : public GLDraw
{
protected:
	std::vector<GLVertex>     m_vertices;
	std::vector<unsigned int> m_indices;
	unsigned int m_diffuseTex;
	unsigned int m_specularTex;
	unsigned int m_reflectTex;	// 反射纹理
	unsigned int m_reflactTex;	// 折射纹理

public:
	GLMesh(const std::vector<GLVertex>& vertices,
		const std::vector<unsigned int>& indices);

	virtual void Draw() const;
	virtual void Draw(int amount) const;

	void SetDiffuseTex(unsigned int diffuse);
	void SetSpecularTex(unsigned int specular);
	void SetReflectTex(unsigned int reflect);
	void SetReflactTex(unsigned int reflact);
};